import QtQuick 1.0
import com.nokia.meego 1.0
import QtMobility.feedback 1.1

Button {
    id: root

    property string character: ""
    property string alternative: ""
    property variant keyboard

    width: 80

    text: (keyboard != 'undefined' && keyboard.shift && alternative != "") ? alternative : character

    onClicked: {
        if (keyboard) {
            keyboard.keyEvent(text);
        }
    }

    HapticsEffect {
        id: haptics
        attackIntensity: 1
        intensity: 0.5
        duration: 50
        running: pressed
    }
}
